Skip to content

Add DCP + Eagle support for Tokenspeed MLA backends#48180

Merged
ywang96 merged 9 commits into
vllm-project:mainfrom
pavanimajety:pm/tokenspeed-mla-dcp-eagle
Jul 13, 2026
Merged

Add DCP + Eagle support for Tokenspeed MLA backends#48180
ywang96 merged 9 commits into
vllm-project:mainfrom
pavanimajety:pm/tokenspeed-mla-dcp-eagle

Conversation

@pavanimajety

@pavanimajety pavanimajety commented Jul 9, 2026

Copy link
Copy Markdown
Member

Purpose

Adds support to run DCP + Tokenspeed_MLA with Eagle.

Builds off of https://github.com/vllm-project/vllm/pull/47915/changes

Test Plan

Validated with unit test and Kimi models and the lightseekai-org's two eagle heads.

Test Result

GSM8k is validated.

Perf (Green- this PR, Blue- No DCP) -- validated with Agentic Benchmark:
image


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)

@mergify

mergify Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--48180.org.readthedocs.build/en/48180/

@mergify mergify Bot added documentation Improvements or additions to documentation ci/build nvidia v1 labels Jul 9, 2026
@pavanimajety pavanimajety marked this pull request as ready for review July 10, 2026 05:23

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Signed-off-by: Pavani Majety <pmajety@nvidia.com>
Signed-off-by: Pavani Majety <pmajety@nvidia.com>
Signed-off-by: Pavani Majety <pmajety@nvidia.com>
Signed-off-by: Pavani Majety <pmajety@nvidia.com>
Signed-off-by: Pavani Majety <pmajety@nvidia.com>
@github-project-automation github-project-automation Bot moved this to Ready in NVIDIA Jul 11, 2026
… to TRTLLM

TRTLLM context attention has no cross-rank LSE combine, so under DCP it
attends only the local interleaved KV shard and produces incorrect prefill
output. Restore the DCP guard in use_trtllm_attention (also un-breaks
test_use_dcp_fallback), drop the force-TRTLLM-prefill block, and assert the
invariant in the TRTLLMPrefill metadata branch. TRTLLM decode under DCP
(all-gathered query heads + LSE combine) is unaffected.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Jingyi Yang <girasoley@inferact.ai>

Signed-off-by: Jingyi Yang <girasoleyang@gmail.com>
…code

trtllm_batch_decode_with_kv_cache has no cp_rank/global-seq-len inputs, so
with q_len > 1 its end-aligned causal mask misattends the DCP-interleaved
local KV shard (spec token i silently misses up to (W-1)(q_len-1-i) entries,
including its own KV on the owner rank). Clamp reorder_batch_threshold to 1
under DCP so spec queries take the DCP-aware prefill path; single-token
trtllm-gen DCP decode (all-gathered heads + LSE combine) stays enabled.
Mirrors the flashinfer_mla revert already made in this PR and the
flashattn_mla precedent (CP-aware kernel args + interleave gate).

Co-authored-by: Claude <noreply@anthropic.com>

Signed-off-by: Jingyi Yang <girasoleyang@gmail.com>

@GirasoleY GirasoleY left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! looking forward to this :)

Comment thread vllm/v1/attention/backends/flashinfer.py Outdated
Comment thread vllm/v1/attention/backends/flashinfer.py Outdated
@GirasoleY

GirasoleY commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Opened pavanimajety#5 for inline comments. Currently just fail close on unsupported paths. Feel free to pick the changes that make sense and merge into this.

[Bugfix] Gate DCP prefill and varlen spec decode on CP-aware paths (for vllm-project#48180)
@ywang96 ywang96 added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 11, 2026
@ivanium ivanium enabled auto-merge (squash) July 11, 2026 23:18
@pavanimajety

Copy link
Copy Markdown
Member Author

Taking a look at the failures.

@pavanimajety pavanimajety changed the title Add DCP + Eagle support for Tokenspeed MLA and Flashinfer backends Add DCP + Eagle support for Tokenspeed MLA backends Jul 12, 2026
Signed-off-by: Pavani Majety <pmajety@nvidia.com>
@ywang96 ywang96 disabled auto-merge July 13, 2026 18:45
@ywang96 ywang96 merged commit 7fc9704 into vllm-project:main Jul 13, 2026
232 of 234 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Done in NVIDIA Jul 13, 2026
NickLucche pushed a commit to NickLucche/vllm that referenced this pull request Jul 15, 2026
Signed-off-by: Pavani Majety <pmajety@nvidia.com>
Signed-off-by: Jingyi Yang <girasoleyang@gmail.com>
Co-authored-by: Jingyi Yang <girasoleyang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build documentation Improvements or additions to documentation nvidia ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants